﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Controls;
using System.Windows;
using VRacer;

namespace VRacer.Controls
{
    public class BonusLayer: ItemsControl
    {
        public BonusLayer()
        {

        }

        protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
        {
            var position = (item as IBonus).Position;
            Canvas.SetTop(element as UIElement, position.Y*10 - 8);
            Canvas.SetLeft(element as UIElement, position.X*10 - 8);
            base.PrepareContainerForItemOverride(element, item);
        }

    }
}
